package org.myspring.dis.ano;

import org.springframework.beans.factory.annotation.Autowired;

public class TextEditor2 {

	// 自动装配属性，省去setXXX
	@Autowired
	private SpellChecker spellChecker;
	private String name;

	public String getName() {
		return name;
	}

	@Autowired(required = false)
	public void setName(String name) {
		System.out.println("inside setName:" + name);
		this.name = name;
	}

	public SpellChecker getSpellChecker() {
		return spellChecker;
	}

	public void spellCheck() {
		System.out.println("TextEditor2.spellCheck()...");
		spellChecker.checkSpelling();
	}
	
	
}
